﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ThirdServices.AlertModel.Factory;
using ThirdServices.AlertModel.Factory.BaseInterface;
using ThirdServices.AlertModel.Norway;
using ThirdServices.AlertModel.Providers.Iris.Verifiers;
using ThirdServices.AlertModel.Providers.Norway;

namespace ThirdServices.AlertModel.Providers.Iris.Factory
{
    public class IrisFactory : AlertBaseFactory
    {
        public IAlert CreateAlert(AlertTypes alert)
        {
            throw new NotImplementedException();
        }

        public IAlert CreateTemperatureAlert(double lat, double lon, double percentage, int periodInDays)
        {
            throw new NotImplementedException();
        }

        public IAlert CreateWindAlert(double lat, double lon, double radius)
        {
            throw new NotImplementedException();
        }

        public IAlert CreatePressureAlert(double lat, double lon, double delta, double radius)
        {
            throw new System.NotImplementedException();
        }

        public IAlert CreateFogAlert(double lat, double lon, double delta, double radius)
        {
            throw new System.NotImplementedException();
        }

        public IAlert CreateHumidityAlert(double lat, double lon, double delta, double radius)
        {
            throw new System.NotImplementedException();
        }

        public IAlert CreateGlobalAlert(double lat, double lon, double radius)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Creates new earthquake alert
        /// </summary>
        /// <param name="pointsMax">Max count of events to return</param>
        /// <param name="latMax">Max latitude</param>
        /// <param name="latMin">Min latitude</param>
        /// <param name="lonMax">Max longitude</param>
        /// <param name="lonMin">Min longitude</param>
        /// <returns>Created alert</returns>
        public IAlert CreateEarthquakeAlert(int pointsMax, double latMax, double latMin, double lonMax, double lonMin)
        {
            IAlert iAlert = new IrisEarthquakeVerifier();
            ((IrisEarthquakeVerifier)iAlert).PointsMax = pointsMax;
            ((IrisEarthquakeVerifier)iAlert).LatMax = latMax;
            ((IrisEarthquakeVerifier)iAlert).LatMin = latMin;
            ((IrisEarthquakeVerifier)iAlert).LonMax = lonMax;
            ((IrisEarthquakeVerifier)iAlert).LatMin = lonMin;

            return iAlert;
        }
    }
}
